package demo03;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @ClassName Person
 * @Description TODO
 * @Author zhongge
 * @Version 1.0
 */
@Component
public class Person {
    //@Autowired
    //private Shirt shirt;
    @Autowired
    private Sweater sweater;
    public void play(){
        //穿上衣服出去玩
        //Shirt shirt = new Shirt();
        //shirt.wear();
        sweater.wear();
        System.out.println("出去玩");
    }
}
